package message

import (
	"context"
	pb "git.mycaigou.com/gfyx/micro-gfyx-user-service/proto/micro_gfyx_user_service_proto/micro-gfyx-user-service"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/service/message"
)

type VerifyCode struct {
	verifyCodeService message.VerifyCodeServiceIface
}

func NewVerifyCode(verifyCodeService message.VerifyCodeServiceIface) pb.VerifyCodeServiceServer {
	return &VerifyCode{
		verifyCodeService: verifyCodeService,
	}
}

func (s *VerifyCode) SendSms(ctx context.Context, request *pb.SendSmsRequest) (*pb.SendSmsResponse, error) {
	resp, err := s.verifyCodeService.SendSmsCode(ctx, request)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
